﻿<div class="widget widget-table">
    <div class="widget-header">
        <h3><i class="fa fa-table"></i> 架位管理</h3>
    </div>
    <div class="widget-content">
        <div class="row">
            <div class="col-sm-12 search-bar">
                <div class="col-sm-12 search-bar">
                    <div class="search-col" style="margin-bottom: 0px;">
                        <button type="button" class="btn btn-primary role" data-role="62" style="margin-left:5px;" ng-click="btnAction('create')">创建架位</button>
                    </div>
                </div>
                <div class="search-col">
                    <label class="search-label">架位类型：</label>
                    <select class="form-control search-control"
                            ng-model="searchBar.type">
                        <option value="">所有</option>
                        <option value="A">海淘客户</option>
                        <option value="B">大客户</option>
                    </select>
                </div>
                <div class="search-col">
                    <label class="search-label">所在仓库：</label>
                    <select class="form-control search-control"
                            ng-model="searchBar.warehouseNumber"
                            ng-options="item.warehouseNumber as item.warehouseName for item in searchBar.warehouseList"></select>
                </div>
                <div class="clearfix"></div>
                <div class="search-col">
                    <label class="search-label">搜索条目：</label>
                    <select class="form-control search-control" ng-model="searchBar.keywordType">
                        <option value="shelfNumber">架位编号</option>
                        <option value="customerNumber">客户编号</option>
                        <option value="itemNumber">商品编号</option>
                    </select>
                    <input type="text" class="form-control search-control" style="margin-left:5px; width:480px;" placeholder="请输入查询关键字" ng-model="searchBar.keywords" />
                    <button type="button" class="btn btn-primary" style="margin-left:5px;" ng-click="btnSearch()">搜索</button>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-12">
                <table class="table table-bordered">
                    <thead>
                        <tr>
                            <th>序号</th>
                            <th>所在仓库</th>
                            <th>架位类型</th>
                            <th>架位编号</th>
                            <th>商品数量</th>
                            <th>操作</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr ng-repeat="item in dataList">
                            <td>{{item.rownumber}}</td>
                            <td>{{getWarehouseName(item.warehouseNumber)}}</td>
                            <td>{{item._type}}</td>
                            <td>
                                <a href="javascript:void(0)" ng-click="btnAction('detail', item)">{{item.shelfNumber}}</a>
                            </td>
                            <td>{{item.itemCount}}</td>
                            <td>
                                <a href="javascript:void(0)" ng-click="btnAction('detail', item)">查看</a>
                                <a href="javascript:void(0)" class="role" data-role="62" ng-click="btnPrint(item)">打印架位标签</a>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>
        </div>
        <div class="row">
            <div class="col-sm-6 text-right pull-right">
                <uib-pagination class="pagination pagination-rewrite pull-right"
                                boundary-links="true"
                                max-size="5"
                                total-items="pagination.totalCount"
                                items-per-page="pagination.pageSize"
                                ng-model="pagination.pageIndex"
                                ng-change="getData()"
                                previous-text="上一页"
                                next-text="下一页"
                                first-text="首页"
                                last-text="尾页">
                </uib-pagination>
                <select class="form-control pull-right" style="width:70px;" ng-model="pagination.pageSize" ng-change="getData()">
                    <option value="10">10</option>
                    <option value="20">20</option>
                    <option value="50">50</option>
                    <option value="100">100</option>
                </select>
            </div>
        </div>
    </div>
</div>
<print-helper></print-helper>